import com.bigmi.common.redis.CacheService;
import com.bigmi.schedule.ScheduleApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest(classes = ScheduleApplication.class)
@RunWith(SpringRunner.class)
public class test1 {
    @Autowired
    private CacheService cacheService;
    @Test
    public void testList(){
        //添加数据list左边添加元素
       // cacheService.lLeftPush("list 001","redis");

        //删除
        String s = cacheService.lRightPop("list 001");
        System.out.println(s);
    }
    @Test
    public void testZset(){
        cacheService.zAdd("zset 001","hhhhh1",1000);
        cacheService.zAdd("zset 001","hhhh22",1001);
        cacheService.zAdd("zset 001","hhh333",1002);
        cacheService.zAdd("zset 001","hh4444",1065);
    }
}
